Skip to content

CXH-434: map no_such_subteam to Unavailable for retry support#73

Merged
btipling merged 4 commits intomainfrom
cxh-434-no-such-subteam
Feb 24, 2026
Merged

CXH-434: map no_such_subteam to Unavailable for retry support#73
btipling merged 4 commits intomainfrom
cxh-434-no-such-subteam

Conversation

@aldevv
Copy link
Contributor

@aldevv aldevv commented Feb 20, 2026

Summary

  • no_such_subteam is a transient Slack API error returned when fetching user group members
  • Previously it fell through MapSlackErrorToGRPCCode and returned codes.Unknown, causing syncs to hard-fail
  • Maps it to codes.Unavailable so the SDK triggers automatic retry logic

Test plan

  • go build ./... passes
  • golangci-lint run passes with 0 issues

Summary by CodeRabbit

  • Bug Fixes

    • Connector now treats missing subteam responses as transient errors, enabling automatic retries and reducing synchronization disruptions.
  • Refactor

    • Action registration simplified to a centralized registry-style entry point, streamlining how actions are registered and initialized.

@aldevv aldevv requested a review from a team February 20, 2026 17:28
@linear
Copy link

linear bot commented Feb 20, 2026

@aldevv aldevv requested review from a team and btipling February 20, 2026 17:28
@coderabbitai
Copy link

coderabbitai bot commented Feb 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6620de0 and fbe7543.

⛔ Files ignored due to path filters (1)
  • .github/workflows/ci.yaml is excluded by none and included by none
📒 Files selected for processing (2)
  • pkg/connector/client/helpers.go
  • pkg/connector/client/slack.go
🚧 Files skipped from review as they are similar to previous changes (2)
  • pkg/connector/client/slack.go
  • pkg/connector/client/helpers.go

Walkthrough

Adds an exported Slack error constant and maps that error to a transient gRPC code; replaces the per-manager action registration API with a registry-based GlobalActions entry point.

Changes

Cohort / File(s) Summary
Slack client constants
pkg/connector/client/slack.go
Adds exported constant SlackErrNoSuchSubteam = "no_such_subteam" with comment.
Slack error mapping
pkg/connector/client/helpers.go
Adds branch in MapSlackErrorToGRPCCode to map occurrences of SlackErrNoSuchSubteam to codes.Unavailable (transient/retryable).
Action registration API
pkg/connector/actions.go
Replaces RegisterActionManager with GlobalActions(ctx context.Context, registry actions.ActionRegistry) error; switches from actionManager.RegisterAction(...) to registry.Register(...), removes connectorbuilder usage and custom manager return.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

I’m a rabbit in the code tonight,
A subteam name now mapped just right,
Retries hop softly when calls go awry,
Actions gather at a registry’s eye,
I twitch my whiskers and give a byte. 🐇

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title directly and clearly summarizes the main change: mapping a Slack error code to Unavailable for retry support, which aligns with the primary objective across all modified files.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch cxh-434-no-such-subteam

Comment @coderabbitai help to get the list of available commands and usage tips.

return codes.NotFound
}

// no_such_subteam is a transient error - map to Unavailable to trigger SDK retry (CXH-434).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is no_such_subteam a transient error? I doesn't sound like it would be? I asked this in the other repo too.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@btipling btipling merged commit 06f3b1a into main Feb 24, 2026
6 checks passed
@btipling btipling deleted the cxh-434-no-such-subteam branch February 24, 2026 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants